Repository navigation
test(ai): drop three tests that duplicate surviving assertions - #801
Merged
Merged
Conversation
Removes 'captures tool calls from stream chunks', 'shows steps only when greater than 1' and 'concatenates tool calls across multiple calls'. Each asserted behavior that is still covered by another test in the same file. Mutation checks against src/ai/index.ts (steps gate, stream tool-input-start, tool-call accumulation) each fail on at least one surviving assertion, so coverage of those paths is unchanged. Test count goes from 103 to 100; no source change.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Thank you for following the naming conventions! 🙏 |
@evlog/cli
evlog
@evlog/nuxthub
@evlog/signals
@evlog/telemetry
commit: |
HugoRCD
approved these changes
Oct 9, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test batch from the 2026-10-09 simplification sweep (revision
a34dffd),packages/evlog/test/ai/ai.test.ts, findings tests-1, tests-2 and tests-3. Test-only change, no source change.Removed:
captures tool calls from stream chunksshows steps only when greater than 1concatenates tool calls across multiple callsEach behavior they assert is still asserted by another test in the same file, so the removal drops no coverage. Test count goes from 103 to 100.
Evidence
Mutation checks, run against
src/ai/index.tsone at a time and reverted after each. Each mutation makes at least one surviving test fail, so the paths stay pinned:state.steps > 1changed to> 0(steps gate)omits stepsUsage for a single call,includes stepsUsage for multiple calls,includes stepsUsage with stream calls,tracks per-step models in stepsUsage(4 failed)tool-input-startbranch disabledcaptures tool call inputs from stream deltas when enabled,does not capture stream tool inputs when toolInputs is false,truncates stream tool inputs with maxLength,includes stepsUsage with stream calls(4 failed)allToolCalls = [item.toolName])captures tool calls from content,does not grow array fields quadratically across multi-step runs,produces a wide event with linear array growth across a multi-step run(3 failed)Checks, run in
/workspace/repoat298d7ec:pnpm --filter evlog exec vitest run test/ai: 100 of 100 passed.eslint packages/evlog/test/ai/ai.test.ts: exit 0.main, and the full suite passed on the source-change branch (refactor(ai): reuse formatTelemetryError and the recordModel resolution #800) at 2014 of 2014.No changeset: test-only, no consumer-visible change.
ELI5
Three of the AI logger's tests checked things that other tests already check. This removes those three. To confirm nothing important is lost, each of the three kinds of breakage was introduced on purpose, and the remaining tests caught every one.